package com.ly.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ResultCode {
    //定义返货成功还是失败--自定义状态码
    SUCCESS                (1000,"操作成功"),
    ERROR                  (2000,"服务繁忙请稍后重试"),
    FAILED                 (3000,"操作失败"),
    FAILED_UNAUTHORIZED    (3001,"未授权"),
    FAILED_PARAMS_VALIDATE (3002,"参数校验失败"),
    FAILED_NOT_EXISTS      (3003,"资源不存在"),
    FAILED_ALREADY_EXISTS  (3004,"资源已存在"),
    AILED_USER_EXISTS      (3101,"用户已存在"),
    FAILED_USER_NOT_EXISTS (3102,"用户不存在"),
    FAILED_LOGIN           (3103,"用户名或密码错误"),
    FAILED_USER_BANNED     (3104,"您已被列入黑名单,请联系管理员"),
    FAILED_USER_PHONE_EMPTY(40001, "手机号不能为空"),
    FAILED_USER_PHONE_INVALID(40002, "手机号格式不正确"),
    FAILED_FREQUENT        (3106,"你获取的操作过于频繁"),
    FAILED_TIME_LIMIT      (3107,"当天请求已达上限"),
    FAILED_CODE_EXPIRED    (3108,"验证码已过期或不存在"),
    FAILED_CODE_MISMATCH   (3109,"验证码不正确"),
    FAILED_SMS_SEND        (3110,"验证码发送失败，请稍后重试"),
    FAILED_CODE_EMPTY      (3111,"验证码为空"),
    FAILED_CODE_FAULT      (3112,"验证码校验失败，请重试"),
    FAILED_INVALID_CODE   (3113,"验证码无效"),

    EXAM_START_TIME_BEFORE_CURRENT_TIME(3201,"竞赛开始时间不能早于当前时间"),
    EXAM_START_TIME_AFTER_END_TIME(3201,"竞赛开始时间不能早于竞赛结束时间"),
    EXAM_RESULT_REPEAT(3203,"竞赛已重复"),
    EXAM_RESULT_NOT_EXIST(3203,"竞赛不存在"),
    EXAM_QUESTION_NOT_EXIST(3204,"为竞赛新增的题目不存在"),
    EXAM_START_EXAM_TIME_NOT_EXIST(3205,"考试开始时间和结束时间不能为空"),
    EXAM_STARTED(3206,"竞赛已经开始"),
    EXAM_NOT_HAS_QUESTION(3207,"竞赛当中不包含题目"),
    EXAM_IS_FINISH(3208,"竞赛已经结束不能进行操作"),
    EXAM_IS_START(3209,"竞赛已经开始"),
    EXAM_IS_PUBLISH(3210,"竞赛已经发布,不能进行操作"),

    TOKEN_IS_DEFAULT(3301,"令牌不能为空或为空字符串"),
    USER_EXAM_HAS_ENTER(3302,"用户已经报名成功,无需重复报名"),

    FAILED_FILE_UPLOAD                  (3401, "文件上传失败"),
    FAILED_FILE_UPLOAD_TIME_LIMIT       (3402, "当天上传图片数量超过上限"),
    FAILED_FIRST_QUESTION               (3501, "当前题目是第一题"),
    FAILED_LAST_QUESTION                (3502, "当前题是最后一题"),
    FAILED_NOT_SUPPORT_PROGRAM          (3601, "当前不支持此语言"),
    FAILED_RABBIT_PRODUCE               (3701, "mq生产消息异常");

    private int code;
    private String msg;


}
